package ws.jdbc.concurrent._development;

/**
 * This class holds some constants to enable debug output per java package.
 *
 * <p>This class is inspired by:
 * <i>O'Reilly - Hardcore Java by Robert Simmons, Jr., 2004</i>
 * </p>
 * 
 * @author Wilson Santos, 36228 <wilson.santos@ua.pt>
 */
public final class DevMode {

  /** Development mode constant for package ws.jdbc.concurrent.driver.sqlserver */
  public static final boolean concurrent_driver_sqlserver = false;
  /** Development mode constant for package ws.jdbc.concurrent.driver.sqlserver.tds */
  public static final boolean concurrent_driver_sqlserver_tds = false;
  /** Development mode constant for package ws.jdbc.concurrent.driver.sqlserver.cursor */
  public static final boolean concurrent_driver_sqlserver_cursor = false;

  /** Singleton class. */
  private DevMode() {
    assert false : "DevMode is a Singleton.";
  }

  public static synchronized void printlog(String message) {
    if (message == null) {
      message = "";
    }
    String methodName = Thread.currentThread().getStackTrace()[2].getMethodName();
    System.out.println("@ " + methodName + "(): " + message);
  }
}
